import request from '@/router/axios'

export function exportExcel(query) {
  return request({
    url: '/stm/swstticketcheck/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

export function approvalObj(obj) {
  return request({
    url: '/stm/swstticketcheck/modify/approval/status',
    method: 'put',
    params: obj
  })
}

export function checkObj(obj) {
  return request({
    url: '/stm/swstticketcheck/check/status',
    method: 'put',
    data: obj
  })
}



export function fetchList(query) {
  return request({
    url: '/stm/swstticketcheck/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/stm/swstticketcheck',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/stm/swstticketcheck/details/' + id,
    method: 'get'
  })
}
//查询车票盘点数据未提交和提交状态数据
export function getTicketCheck(date) {
  return request({
    url: '/stm/swstticketcheck/getTicketCheck?checkTime='+date,
    method: 'get'
  })
}

//查询车票盘点数据未提交状态数据
export function getTicketCheckOfSubmit(date) {
  return request({
    url: '/stm/swstticketcheck/getTicketCheckOfSubmit?checkTime='+date,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/stm/swstticketcheck/' + id,
    method: 'delete'
  })
}
export function delsObj(id) {
  return request({
    url: '/stm/swstticketcheck/batchCascadeDel',
    method: 'delete',
    data:id
  })
}

export function putObj(obj) {
  return request({
    url: '/stm/swstticketcheck',
    method: 'put',
    data: obj
  })
}

export function getTypeValue(query) {
  return request({
    url: '/admin/dict/type/check_day',
    method: 'get',
    params: query
  })
}

